class Solution(object):
    def merge(self, nums1, m, nums2, n):
        nums1[m:] = nums2
        nums1.sort()

if __name__ == '__main__':
    list1 = [1, 2, 3, 4]
    list2 = [2,4]
    solution = Solution()
    solution.merge(list1, len(list1), list2, len(list2))
    print(list1[:])